<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ChompBombs:  Fichier source de /home/etu/c/p1006411/chompbombs/src/terrain.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Généré par Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Recherche');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ChompBombs</div>
   <div id="projectbrief">Jeu_de_Bomberman</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Recherche" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>/home/etu/c/p1006411/chompbombs/src/terrain.h</h1>  </div>
</div>
<div class="contents">
<a href="terrain_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00007"></a>00007 <span class="preprocessor">#ifndef __TERRAIN__H</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define __TERRAIN__H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="keyword">struct </span><a class="code" href="structbombe.html" title="contient les coordonnées, la puissance et l&amp;#39;heure d&amp;#39;initialisation de la bombe">bombe</a>;
<a name="l00012"></a>00012 <span class="keyword">struct </span><a class="code" href="structennemi.html" title="contient les coordonnées, le numéro et une heure d&amp;#39;initialisation de l&amp;#39;ennemi">ennemi</a>;
<a name="l00013"></a>00013 <span class="keyword">struct </span><a class="code" href="structchemin.html" title="case contenant un numero et la direction associé (utilisé pour l&amp;#39;IA)">chemin</a>;
<a name="l00014"></a>00014 
<a name="l00019"></a><a class="code" href="structterrain.html">00019</a> <span class="keyword">struct </span><a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a> {
<a name="l00020"></a><a class="code" href="structterrain.html#a01bb883200c7078da67f204f9a8d6089">00020</a>         <span class="keywordtype">int</span> <a class="code" href="structterrain.html#a01bb883200c7078da67f204f9a8d6089">tailleX</a>;
<a name="l00021"></a><a class="code" href="structterrain.html#ab16731e57dffcca2b3f7e9e89b4f4f14">00021</a>         <span class="keywordtype">int</span> <a class="code" href="structterrain.html#ab16731e57dffcca2b3f7e9e89b4f4f14">tailleY</a>;
<a name="l00022"></a><a class="code" href="structterrain.html#a667366e94c27f69acdae0227dfc84978">00022</a>         <span class="keywordtype">char</span> **<a class="code" href="structterrain.html#a667366e94c27f69acdae0227dfc84978">terrainTab</a>;
<a name="l00023"></a><a class="code" href="structterrain.html#a2019554df9ede6eb6431987870edcfa1">00023</a>         <span class="keywordtype">int</span> **<a class="code" href="structterrain.html#a2019554df9ede6eb6431987870edcfa1">dangerTab</a>;
<a name="l00024"></a><a class="code" href="structterrain.html#a21b0adb46ca15bf1566f996b584b19fa">00024</a>     <span class="keyword">struct </span><a class="code" href="structchemin.html" title="case contenant un numero et la direction associé (utilisé pour l&amp;#39;IA)">chemin</a> **<a class="code" href="structterrain.html#a21b0adb46ca15bf1566f996b584b19fa">numCheminTab</a>;
<a name="l00025"></a><a class="code" href="structterrain.html#a09722c72ec02decf6cf655f285babb59">00025</a>         <span class="keyword">struct </span><a class="code" href="structbombe.html" title="contient les coordonnées, la puissance et l&amp;#39;heure d&amp;#39;initialisation de la bombe">bombe</a>* <a class="code" href="structterrain.html#a09722c72ec02decf6cf655f285babb59">bombeTab</a>[7];
<a name="l00026"></a><a class="code" href="structterrain.html#a2cd791031c20627ac9d02eebb939f7d8">00026</a>         <span class="keyword">struct </span><a class="code" href="structennemi.html" title="contient les coordonnées, le numéro et une heure d&amp;#39;initialisation de l&amp;#39;ennemi">ennemi</a>* <a class="code" href="structterrain.html#a2cd791031c20627ac9d02eebb939f7d8">ennemiTab</a>[5];
<a name="l00027"></a><a class="code" href="terrain_8h.html#a960835ae93975310a34d88ef7a73e212">00027</a> }; <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a> <a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a>;
<a name="l00028"></a>00028 
<a name="l00036"></a>00036 <span class="keywordtype">void</span> <a class="code" href="terrain_8c.html#ae01cd4fca68d9262e64cf8f22ecfd434" title="initialise un terrain">terrainInit</a>(<a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a>* ter, <span class="keyword">const</span> <span class="keywordtype">int</span> numeroTerrain, <span class="keyword">const</span> <span class="keywordtype">int</span> mode);
<a name="l00037"></a>00037 
<a name="l00043"></a>00043 <span class="keywordtype">void</span> <a class="code" href="terrain_8c.html#abe33ec4c65ec249c6cc8e1a04441927d" title="libère la mémoire allouée pour un terrain">terrainLibere</a>(<a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a>* ter);
<a name="l00044"></a>00044 
<a name="l00052"></a>00052 <span class="keywordtype">int</span> <a class="code" href="terrain_8c.html#aaa0e2acc9fbee30d039e1e7722622751" title="verifie que la position x,y est une case accessible">terrainPositionValide</a>(<span class="keyword">const</span> <a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a>* ter, <span class="keyword">const</span> <span class="keywordtype">int</span> x, <span class="keyword">const</span> <span class="keywordtype">int</span> y);
<a name="l00053"></a>00053 
<a name="l00061"></a>00061 <span class="keywordtype">char</span> <a class="code" href="terrain_8c.html#aeedeb6dae05dfe4b4cfa1a2503abc417" title="récupere le caractere à la case x,y">terrainGetXY</a>(<span class="keyword">const</span> <a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a>* ter, <span class="keyword">const</span> <span class="keywordtype">int</span> x, <span class="keyword">const</span> <span class="keywordtype">int</span> y);
<a name="l00062"></a>00062 
<a name="l00071"></a>00071 <span class="keywordtype">void</span> <a class="code" href="terrain_8c.html#ad442b003f125c74f40a935dbbb0273dd" title="modifie le caractere à la case x,y">terrainSetXY</a>(<a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a>* ter, <span class="keyword">const</span> <span class="keywordtype">int</span> x, <span class="keyword">const</span> <span class="keywordtype">int</span> y, <span class="keyword">const</span> <span class="keywordtype">char</span> objet);
<a name="l00072"></a>00072 
<a name="l00078"></a>00078 <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="terrain_8c.html#a89eb2a5065a39881bdabcedbeba132a6" title="recupere la largeur du terrain">getTailleX</a>(<span class="keyword">const</span> <a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a> *ter);
<a name="l00079"></a>00079 
<a name="l00085"></a>00085 <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="terrain_8c.html#a273af22839aebf729746175e8e8aef76" title="recupere la hauteur du terrain">getTailleY</a>(<span class="keyword">const</span> <a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a> *ter);
<a name="l00086"></a>00086 
<a name="l00092"></a>00092 <span class="keywordtype">int</span> <a class="code" href="terrain_8c.html#aca49d2564e8bae018eec94fd7e925ace" title="compte le nombre de caisses sur le terrain">compteCaisses</a>(<span class="keyword">const</span> <a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a>* ter);
<a name="l00093"></a>00093 
<a name="l00101"></a>00101 <span class="keywordtype">void</span> <a class="code" href="terrain_8c.html#a16bb9a7394ec00e4fd5d9d2b44e32ea3" title="initialise un tableau">initDangerTab</a>(<span class="keywordtype">int</span> **<a class="code" href="structterrain.html#a2019554df9ede6eb6431987870edcfa1">dangerTab</a>, <span class="keyword">const</span> <span class="keywordtype">int</span> x, <span class="keyword">const</span> <span class="keywordtype">int</span> y);
<a name="l00102"></a>00102 
<a name="l00110"></a>00110 <span class="keywordtype">int</span> <a class="code" href="terrain_8c.html#ab43d7bc06d2d0ce8e002d7e1147a664f" title="retourne 1 si la case x,y est une zone danger, 0 sinon">estZoneDanger</a>(<span class="keywordtype">int</span>** tab, <span class="keyword">const</span> <span class="keywordtype">int</span> x, <span class="keyword">const</span> <span class="keywordtype">int</span> y);
<a name="l00111"></a>00111 
<a name="l00118"></a>00118 <span class="keywordtype">void</span> <a class="code" href="terrain_8c.html#a7bdae09db035b21294068cc65bc1f5b3" title="rempli le champs dangerTab du terrain en fonction des bombes présentes sur le terrain">remplirDangerTab</a>(<a class="code" href="structterrain.html" title="contient la taille, des tableaux de bombes, de gestion d&amp;#39;ennemis, et de sa forme">terrain</a>* ter, <span class="keyword">const</span> <span class="keywordtype">int</span> puissance);
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tout</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Fichiers</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Fonctions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Définition de type</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Énumérations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Valeurs énumérées</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Généré le Thu Jun 7 2012 15:48:57 pour ChompBombs par&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
